A typical auto focusing mechanism built in an electronic level has a device as shown in FIGS. 10 and 11. This auto focusing mechanism is equipped with a drive circuit 4 for controlling the motion of a stepping motor 41 for moving focusing lens 21b of a telescope (serving as a collimating optical system) along the optical axis thereof, the telescope having an objective lens 21a, an automatic collimation axis compensation mechanism 22, a beam splitter 23, a focusing plate 20a, and an eyepiece 20b, in addition to the focusing lens 21b. This auto focusing mechanism is also equipped with a line sensor 24 adapted to convert into an electric signal the image of a staff that is sighted by the telescope and captured through a beam splitter 23. The electric signal outputted from the line sensor 24 is amplified by an amplifier 25 and then converted into a digital signal by an analog-to-digital (A/D) converter 27. The digital signal is stored in a RAM 28 before it is sent to a microcomputer 3. The microcomputer 3 is adapted to:
obtain the pitch of multiple black marks (graduations marked at equal intervals on the white surface of the staff, forming a dark-and-bright pattern), based on the digital signal stored in the RAM 28;
obtain the distance from the telescope 20 to the staff based on the pitch obtained; and
control the focusing lens 21b so as to bring the focusing lens 21b to the focusing position associated with the distance.
When a control signal is supplied from the drive circuit 4 to the stepping motor 41 under the control of the microcomputer 3, the stepping motor 41 moves and stops the focusing lens 21b until the focusing lens reaches the focusing position, that is, until the telescope 20 is automatically focused on the staff.
To do so, the focusing lens 21b is once moved to the far end of its movable range, adjacent to the eye piece 20b, where the telescope 20 is focused on an infinite point, for which the output signal of the line sensor 24 has a substantially flat waveform, as shown in FIG. 11 (a). Before the focusing lens 21b is moved away from the far end (where the telescope 20 is focused on an infinite point) towards the objective lens 21a, the microcomputer 3 sets a threshold level a below the peak level of the line sensor 24, and then moves the focusing lens 21b towards the objective lens 21a. In this step, the focusing lens 21b is stopped once when the output signal of the line sensor 24 exceeds the threshold α, and once when lowered below the threshold a to determine a range β in which the output signal assumes a level between the threshold level α and the peak level, as shown in FIG. 11(b). The position of the centerline CL of the range β is also determined. When two or more than two different ranges are observed, the positions of the respective centerlines CL and the average interval of the centerlines CL are determined. Since this average interval corresponds to the pitch of the imaged graduations of the staff 1 formed on the line sensor 24, the distance between the telescope 20 and the staff can be calculated based on the pitch. The telescope can be accurately focused on the staff by moving the focusing lens 21b to the focusing position as determined by the distance calculated. When the telescope 20 is automatically focused on the staff, the output signal of the line sensor 24 will have a waveform as shown in FIG. 11 (c).
In the conventional auto focusing mechanism, in order to automatically focus the telescope on the staff having thereon a pattern of equally spaced graduations, a decision is made that the focusing lens 21b is positioned at a substantial focusing position when the output level of the line sensor 24 has exceeded a given threshold level α, and the pitch of the graduations of the staff is computed from the output signal of the line sensor 24. However, under certain conditions of the staff, the status of the focusing lens being at a substantial focusing position cannot be correctly detected.
This happens because the staff is not always used in a uniformly illuminated environment, or because it may be used in a dark environment where the output level of the line sensor 24 cannot not exceed the threshold level a anywhere in the movable range of the focusing lens 21b. On the contrary, if an object brighter than the staff exists in the field of the telescope, the telescope can be focused on the brighter object, which causes the output level of the line sensor 24 to exceed the threshold level α, thereby resulting in an erroneous focusing of the telescope on the object other than the staff, which inevitably necessitates a time wasting redo of the survey.
It should be understood that the staff is not always entirely captured in the field of the telescope. For example, in cases where only an upper or lower portion of the staff is used in the survey, background objects other than the staff will result in signals that will mix into the output signal of the line sensor 24. Thus, in the event that the level of a background signal mixed in the output signal of the line sensor 24 exceeds the threshold level α, an erroneous determination of the focusing position, and hence of erroneous distance, will result if focusing position determination is made under such condition.
In other words, in processing the output signal of the line sensor 24, if the pitch of the pattern on the staff is calculated based on erroneous data or low-level output signals, a problem will arise in that an incorrect or inaccurate distance results.
Then, auto focusing of the telescope 20 on the staff will fail, thereby entailing a long survey time and lowering the working efficiency of the survey, or lose its accuracy, thereby influencing badly on the survey.
In view of these drawbacks pertinent to prior art auto focusing mechanisms, the invention is directed to an improvement in auto focusing mechanism in which the status of the focusing lens being located at a focusing position can be correctly and quickly detected.